package com.xuecheng.media.service;

import com.xuecheng.media.model.po.MediaProcess;

import java.util.List;

/**
 * @description: 媒资文件任务处理接口
 * @author: ajie
 * @date: 2024/1/23 21:45:36
 * @version: 1.0
 */
public interface MediaFileProcessService {


    /**
     * @description: 获取待处理任务
     * @params: [shardIndex, shardTotal, count]
     * @return:
     * @author: ajie
     * @date: 2024/1/23 21:49
     */
    public List<MediaProcess> getMediaProcessList(int shardIndex,int shardTotal,int count);

    /**
     * @description: 开启一个任务
     * @params: [id]
     * @return:
     * @author: ajie
     * @date: 2024/1/24 9:31
     */
    public boolean startTask(long id);

    /**
     * @description: 保存任务结果 
     * @params: [taskId, status, fileId, url, errorMsg]       
     * @return: 
     * @author: ajie
     * @date: 2024/1/24 10:41
     */
    void saveProcessFinishStatus(Long taskId,String status,String fileId,String url,String errorMsg);
}
